#filename list.py
fruits = ['apple','orange','banana']
print(fruits)
for i in fruits:
	print(i,'<>')
fruits.append('pear')
print(fruits)
print(len(fruits))
fruits.sort()
print(fruits)
del(fruits[3])
print(fruits)

#元祖 [a,b]不可变

#字典{k:V,k2:v2} .items() 返回键和值的元祖
shoplist = ['apple', 'mango', 'carrot', 'banana']
# >>> shoplist[::1]
# ['apple', 'mango', 'carrot', 'banana']
# >>> shoplist[::2]
# ['apple', 'carrot']
# >>> shoplist[::3]
# ['apple', 'banana']
# >>> shoplist[::-1]
# ['banana', 'carrot', 'mango', 'apple']
# 注意当步长是 2 时，我们得到在位置 0,2,... 的项，当步长

